<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>布尔值和对象</title>
</head>

<body>
    <p>boolean：布尔值，结果只有两种，true 和 false</p>
    <p>true 的值为 1，false 的值为 0。</p>
    <script>
        var a = true + false;
        var b = true + 0;
        var c = false + 1;
        var obj = { name: "张三", age: 20, sex: "男" };
        console.log(obj);
        document.write("a=" + a, "<br>", "b=" + b, "<br>", "c=" + c);
        document.write("<br>", "obj=" + obj);
    </script>
</body>

</html>